<template>
  <div class='page grey-stage'>
  <scroller ref="my_scroller">
    <div class="container" :style="containerHeight">
      <menu-grid :bar-title="marketingManageTitle" :grid-list="marketingManage"></menu-grid>
      <menu-grid :bar-title="salesSupportTitle" :grid-list="salesSupport"></menu-grid>
    </div>
  </scroller>
  <crm-tabbar activeItem='h5marketing'></crm-tabbar>
  </div>
</template>
<script>

  import Vue from 'vue'
  import MenuGrid from '../components/menu-grid';
  import crmTabbar from '../components/crm-tabbar'
  import Scroller from 'vue-scroller'

  export default{
  data () {
    let imgServer = this.$store.state.app.imgServer;

    return {
      containerHeight : 'height:'+document.body.scrollHeight+'px;',
      marketingManageTitle : "销售管理",
      salesSupportTitle: '销售支持',
      marketingManage : [
      {
        icon: imgServer+'normalclient.png',
        text: '社交客户',
        link: {path:'social-client',query:{
          title: '社交客户',
          custom_type:0
        }},
      },

      {
        icon: imgServer+'followrecord.png',
        text: '跟进记录',
        link: {path:'follow-record',query:{
          title: '跟进记录',
          custom_type:0,
          activeItem:'h5marketing'
        }},
      },

      //一期不做
      // {
      //   icon: imgServer+'auditionsign.png',
      //   text: '试听签到',
      //   link: '',
      // },

      {
        icon: imgServer+'redispatchclient.png',
        text: '客户重新分配',
        link:{path:'reassign-client',query:{
          title: '客户重新分配',
          custom_type:0,
          activeItem:'h5marketing'
        }},
      }
      ],
      salesSupport : [
      {
        icon: imgServer+'clientsources.png',
        text: '客户公海',
        link: {path:'client-seas',query:{
          title: '客户公海',
          custom_type : 0,
          activeItem : 'h5marketing',
        }},
      },

      // {
      //   icon: imgServer+'clientsources.png',
      //   text: 'vscroller',
      //   link: {path:'vscroller',query:{
      //     title: 'vscroller',
      //     custom_type : 0,
      //     activeItem : 'h5marketing',
      //   }},
      // },

      ]
    };
  },
  components:{
    MenuGrid,
    crmTabbar,
    Scroller
  },

  mounted () {
    this.callJsApi('biz.navigation.setTitle',{title:'H5营销'});
  }
  }
</script>
